<%@ page import="java.util.Enumeration"%>
<%@ page import="java.util.Collection"%>
<%@ page import="org.springframework.prospring.ticket.domain.Club"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>

<html>
    <head>
        <title>Seats reserved for <c:out value="${performance.show.name}"/></title>
    </head>


<%
Enumeration  e = request.getAttributeNames();
    while (e.hasMoreElements()) {
        String attirbuteName = (String) e.nextElement();

        System.out.println("###############################  attirbuteName = " + attirbuteName);

    }

    Collection myClubs = (Collection) request.getAttribute("clubs");
    if (myClubs != null) {
        for (java.util.Iterator iterator = myClubs.iterator(); iterator.hasNext();) {
            Club club = (org.springframework.prospring.ticket.domain.Club) iterator.next();
            System.out.println("club.getId() = " + club.getId());
        }
    }

%>
<script language="JavaScript" type="text/javascript">

    function submitReservationFieldRequestForm5(regionId, clubId, fieldId, reservationDate, turnTime) {
        //var form = document.getElementById("submitReservationFieldRequestForm5");
        var form = document.forms["nameReservationFieldRequestForm5"];
        form.regionId.value = regionId;
        form.clubId.value = clubId;
        form.fieldId.value = fieldId;
        form.reservationDate.value = reservationDate;
		form.submit();
	}

</script>
<body>

<!-- before insert reservationSearchForm -->
<tiles:insert attribute="reservationSearchForm"/>
<!-- after insert reservationSearchForm -->



<%-- ====== Begin: DATOS DEL CLUB =============================--%>
<c:choose>
    <c:when test="${not empty clubSelected}">
        <table id="tbl_sedes" align="center" border="1" bordercolor="#006600" cellpadding="2" cellspacing="0" height="250" width="350">
        <tbody>
            <tr>
                <th scope="col"><c:out value="${clubSelected.id}"/> - <c:out value="${clubSelected.name}"/></th>
            </tr>
            <tr>
                <td>Canchas de Futbol - Escuela - Gimnasio - Buffet</td>
            </tr>
            <tr>
                <td>4866-4047 / 4862-9386/9392</td>
            </tr>
            <tr>
                <td>Mail: <c:out value="${clubSelected.mail}"/></td>
            </tr>
            <tr>
                <td>Gallo 241</td>
            </tr>
            <tr>
                <td>Horario : 08 a 22 hs</td>
            </tr>
            <tr>
                <td height="17">Como llegar<br>xxxx</td>
            </tr>
            <tr>
                <td>
                    <table border="1" bordercolor="#006600" cellpadding="1" cellspacing="0" height="100%" width="100%">
                        <tbody><tr>
                            <th scope="col" width="175">Estacionamiento</th>
                            <th scope="col" width="178">Buffet/Bebidas</th>
                        </tr>
                            <tr>
                                <td><div align="center">SI</div></td>
                                <td><div align="center">SI</div></td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
        </table>

    </c:when>
    <c:otherwise>
        <!-- selected club is empty -->
    </c:otherwise>
</c:choose>
<%-- ====== END: DATOS DEL CLUB =============================--%>


<%-- ====== Begin: DATOS DE LA RESERVASION =============================--%>
<c:choose>
    <c:when test="${not empty reservedTurn}">
        <table id="tbl_sedes" align="center" border="1" bordercolor="#006600" cellpadding="2" cellspacing="0" height="250" width="350">
        <tbody>
            <tr>
                <th scope="col">El turno se reservo, con el numero <c:out value="${reservedTurn.id}"/></th>
            </tr>
        </tbody>
        </table>

    </c:when>
    <c:otherwise>
        <!-- reserved Turn is empty -->
    </c:otherwise>
</c:choose>
<%-- ====== End: DATOS DE LA RESERVASION =============================--%>



</body>

</html>


<!-- ************************************************ -->
<!-- pageName: formReservationFieldStep5.jsp          -->
<!-- ************************************************ -->
